import $http from '@/common/api/request.js';
//微信创建订单
export function createOrderAPI(data) {
	return $http.post('/api/orders/add',data)
}

//获取订单数据
export function getUserOrderByIdAPI(data) {
	console.log(88888,data)
	return $http.get('/api/orderInfo/select',data)
}

//调起支付
export function orderPayAPI(data) {
	return $http.post('/api/wechat/wxpay',data)
}

//根据用户id和订单状态类型获取所有订单
export function getUserOrderByStatusAPI(data) {
	return $http.get('/api/orders/select',data)
}

//取消订单
export function cancelUserOrderAPI(data) {
	return $http.get('/api/wechat/closeorder',data)
}

//退款订单
export function refundUserOrderAPI(data) {
	return $http.get('/api/wechat/refundsorder',data)
}

//获取所有订单状态
export function getAllOrderStatusAPI(data) {
	return $http.get('/api/orders/orderdictlist',data)
}

//确认订单
export function confirmUserOrderAPI(data) {
	return $http.get('/api/orders/completeOrder',data)
}